﻿namespace EyeOpen.Editing.Windows
{
	using System.ComponentModel;

	public abstract class Validable<T> : IDataErrorInfo
		where T : class 
	{
		string IDataErrorInfo.Error
		{
			get
			{
				return null;
			}
		}

		public string this[string columnName]
		{
			get
			{
				return 
					DependencyResolver
						.Resolve<IValidator<T>>()
							.Validate(this, columnName);
			}
		}
	}
}